#include <bits/stdc++.h>

using namespace std;

int main() {
	vector<int> v(3);
	cin >> v[0] >> v[1] >> v[2];

	for (int i = 0; i < v.size(); i++) {
		if (v[i] == 1) {
			cout << i + 1 << " ";
		}
	}

	for (int i = 0; i < v.size(); i++) {
		if (v[i] == 2) {
			cout << i + 1 << " ";
		}
	}

	for (int i = 0; i < v.size(); i++) {
		if (v[i] == 3) {
			cout << i + 1 << endl;
		}
	}


}